<style>
    .layui-form-label {
        width: 70px;
    }
</style>
<div class="layuimini-container">
    <div class="layuimini-main" id="app">
        <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
            <ul class="layui-tab-title">
                <li class="layui-this">短信配置</li>
                <li>短信宝配置</li>
                {if lsAuth()}
                <li>阿里云短信</li>
                <li>腾讯云短信</li>
                {/if}
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">

                    <form class="layui-form layuimini-form">
                        <input type="hidden" name="field" value="sms">
                        <div class="layui-form-item">
                            <label class="layui-form-label required">发送通道</label>

                            <div class="layui-input-block">
                                {if lsAuth()}
                                {foreach ['smsbao'=>'短信宝','alisms'=>'阿里云短信','txsms'=>'腾讯云短信'] as $key=>$val}
                                <input type="radio" v-model="send_type" name="send_type" lay-filter="send_type" value="{$key}" title="{$val}" {if $key==sysconfig('sms','send_type')}checked=""{/if}>
                                {/foreach}
                                {else /}
                                <input type="radio" v-model="send_type" name="send_type" lay-filter="send_type" value="smsbao" title="短信宝" checked>
                                {/if}
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">站长手机号(接收通知)</label>
                            <div class="layui-input-inline">
                                <textarea class="layui-textarea"  name="admin_phone">{:sysconfig('sms.admin_phone')}</textarea>
                            </div>
                            <button class="layui-btn"  lay-submit="ajax/sendsms" lay-filter="sendEmail">测试短信</button>

                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">短信模板[非必要不修改]</label>
                            <div class="layui-input-block">
                                <textarea class="layui-textarea"  name="msg_tpl">{:sysconfig('sms.msg_tpl')}</textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">单个手机一天限制条数</label>
                            <div class="layui-input-inline">
                                <input type="number" name="mobile_max" value="{:sysconfig('sms.mobile_max')}" placeholder="每个手机每天可发送条数" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">发送间隔(分钟)</label>
                            <div class="layui-input-inline">
                                <input type="number" name="interval_time" value="{:sysconfig('sms.interval_time')}" placeholder="每条短信发送间隔" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">同一IP一天限制</label>
                            <div class="layui-input-inline">
                                <input type="number" name="ip_max" value="{:sysconfig('sms.ip_max')}" placeholder="每条短信发送间隔" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">过期时间(分钟)</label>
                            <div class="layui-input-inline">
                                <input type="number" name="expiry_time" value="{:sysconfig('sms.expiry_time')}" placeholder="过期时间（分）" autocomplete="off" class="layui-input">
                            </div>
                        </div>

                        <div class="hr-line"></div>
                        <div class="submit-info text-center">
                            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="system.config/save" data-refresh="false">确认</button>
                            <a class="layui-btn layui-btn-primary layui-btn-sm" layform-close>关闭</a>
                            <a  class="layui-btn layui-btn-sm" target="_blank" href="https://bbs.laysns.com/thread/2724.html">帮助文档</a>
                        </div>

                    </form>

                </div>
                <div class="layui-tab-item">
                    <form class="layui-form layuimini-form">
                        <input type="hidden" name="field" value="smsbao">
                        <div class="layui-form-item layui-row">
                            <div class="layui-col-md3">
                                <label class="layui-form-label">用户名</label>
                                <div class="layui-input-block">
                                    <input type="text" name="username" value="{:sysconfig('smsbao','username')}"
                                           required lay-verify="required" autocomplete="off"
                                           class="layui-input">
                                </div>
                            </div>
                            <div class="layui-col-md3">
                                <label class="layui-form-label">密码</label>
                                <div class="layui-input-block">
                                    <input type="password" name="password" value="{:sysconfig('smsbao','password')}"
                                           required lay-verify="required" autocomplete="off"
                                           class="layui-input">
                                </div>
                            </div>
                            <div class="layui-col-md3">
                                <label class="layui-form-label">签名</label>
                                <div class="layui-input-block">
                                    <input type="text" name="signature" value="{:sysconfig('smsbao','signature')}" required
                                           lay-verify="required" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>

                        <div class="hr-line"></div>
                        <div class="submit-info text-center">
                            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="system.config/save" data-refresh="false">确认</button>
                            <a class="layui-btn layui-btn-primary layui-btn-sm" layform-close>关闭</a>

                        </div>

                    </form>

                </div>
                <div class="layui-tab-item">
                    <form class="layui-form layuimini-form">
                        <input type="hidden" name="field" value="alisms">

                        <div class="layui-form-item">
                            <label class="layui-form-label required">AccessKey ID</label>
                            <div class="layui-input-block">
                                <input type="text" name="access_key_id" class="layui-input" lay-verify="required" lay-reqtext="请输入公钥信息" placeholder="请输入公钥信息" value="{:sysconfig('alisms','access_key_id')}">
                                <tip>例子：FSGGshu64642THSk</tip>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label required">AccessKey Secret</label>
                            <div class="layui-input-block">
                                <input type="text" name="access_key_secret" class="layui-input" lay-verify="required" lay-reqtext="请输入私钥信息" placeholder="请输入私钥信息" value="{:sysconfig('alisms','access_key_secret')}">
                                <tip>例子：5fsfPReYKkFSGGshu64642THSkmTInaIm</tip>
                            </div>
                        </div>



                        <div class="layui-form-item">
                            <label class="layui-form-label required">签名名称</label>
                            <div class="layui-input-inline">
                                <input type="text" name="signature" class="layui-input" lay-verify="required" lay-reqtext="请输入访问域名" placeholder="请输入访问域名" value="{:sysconfig('alisms','signature')}">
                                <tip>例子：类森科技</tip>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">模版CODE[非必要不修改]</label>
                            <div class="layui-input-block">
                                <textarea class="layui-textarea"  name="template_code">{:sysconfig('alisms.template_code')}</textarea>
                            </div>
                        </div>

                        <div class="hr-line"></div>
                        <div class="submit-info text-center">
                            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="system.config/save" data-refresh="false">确认</button>
                            <a class="layui-btn layui-btn-primary layui-btn-sm" layform-close>关闭</a>
                        </div>

                    </form>

                </div>

                <div class="layui-tab-item">
                    <form  class="layui-form layuimini-form">

                        <input type="hidden" name="field" value="txsms">

                        <div class="layui-form-item">
                            <label class="layui-form-label required">AppID</label>
                            <div class="layui-input-block">
                                <input type="text" name="app_id" class="layui-input" lay-verify="required" lay-reqtext="请输入公钥信息" placeholder="请输入公钥信息" value="{:sysconfig('txsms','app_id')}">
                                <tip>例子：1400483999</tip>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label required">App Key</label>
                            <div class="layui-input-block">
                                <input type="text" name="app_key" class="layui-input" lay-verify="required" lay-reqtext="请输入私钥信息" placeholder="请输入私钥信息" value="{:sysconfig('txsms','app_key')}">
                                <tip>例子：7b3f9053c2d943da494c2e4591232e97</tip>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label required">签名名称</label>
                            <div class="layui-input-inline">
                                <input type="text" name="signature" class="layui-input" lay-verify="required" lay-reqtext="请输入访问域名" placeholder="请输入短信签名" value="{:sysconfig('txsms','signature')}">
                                <tip>例子：类森科技</tip>
                            </div>
                        </div>

                        <div class="hr-line"></div>
                        <div class="submit-info text-center">
                            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="system.config/save" data-refresh="false">确认</button>
                            <a class="layui-btn layui-btn-primary layui-btn-sm" layform-close>关闭</a>
                        </div>

                    </form>
                </div>
            </div>
        </div>

    </div>
</div>